﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Backend.JYD.Model.Rate;

namespace Backend.JYD.IDAL.Rate
{
    public interface IWeightTemplete
    {
        Int64 AddWeightTemplete(WeightTemplete weight);

        bool UpdateWeightTemplete(WeightTemplete weight);

        bool CancelWeightTemplete(Int64 weightId);

        WeightTemplete GetWeightTempleteByWeightId(Int64 weightId);

        WeightTemplete GetWeightTempleteByModelId(Int64 modelId, int version);

        //根据modelId和weight的版本version查询所有子节点数据
        IList<RateModel> loadChildWeights(Int64 modelId, Int64 version);
        //查询所有的权重数据
        IList<RateModel> loadAllWeights(long modelId);
        //创建新版权重树
        bool SaveTree();
    }
}
